package cate.game.common.msg;

import cate.game.GameBody;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgOutput;
import cate.game.client.msg.id.MsgIdBCommon;
import easy.java.dev.note.NoteField;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@ClientMsg(title = "服务器配置信息 の 通知")
public class ServerInfoResp implements MsgOutput {

    @NoteField(value = "游戏服ID")
    public int srvId;

    @NoteField(value = "该游戏服所属组服编码")
    public String groupCode;

    public ServerInfoResp(GameBody game) {
        this.srvId = game.config.srvId;
        this.groupCode = game.config.gs.getGroupCode();
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBCommon.SERVER_INFO_RESP;
    }
}

